Integrand size = 31, antiderivative size = 123 \[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 (5 A+7 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d}+\frac {2 (5 A+7 C) \sqrt {\cos (c+d x)} \sin (c+d x)}{21 d}+\frac {2 B \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{5 d}+\frac {2 A \cos ^{\frac {5}{2}}(c+d x) \sin (c+d x)}{7 d} \]
6/5*B*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d* x+1/2*c),2^(1/2))/d+2/21*(5*A+7*C)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d* x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))/d+2/5*B*cos(d*x+c)^(3/2)*si n(d*x+c)/d+2/7*A*cos(d*x+c)^(5/2)*sin(d*x+c)/d+2/21*(5*A+7*C)*sin(d*x+c)*c os(d*x+c)^(1/2)/d
Time = 2.88 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.70 \[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {126 B E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+10 (5 A+7 C) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sqrt {\cos (c+d x)} (65 A+70 C+42 B \cos (c+d x)+15 A \cos (2 (c+d x))) \sin (c+d x)}{105 d} \]
(126*B*EllipticE[(c + d*x)/2, 2] + 10*(5*A + 7*C)*EllipticF[(c + d*x)/2, 2 ] + Sqrt[Cos[c + d*x]]*(65*A + 70*C + 42*B*Cos[c + d*x] + 15*A*Cos[2*(c + d*x)])*Sin[c + d*x])/(105*d)
Time = 0.57 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.02, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.387, Rules used = {3042, 4552, 3042, 3502, 27, 3042, 3227, 3042, 3115, 3042, 3119, 3120}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^{7/2} \left (A+B \sec (c+d x)+C \sec (c+d x)^2\right )dx\) |
\(\Big \downarrow \) 4552 |
\(\displaystyle \int \cos ^{\frac {3}{2}}(c+d x) \left (A \cos ^2(c+d x)+B \cos (c+d x)+C\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^{3/2} \left (A \sin \left (c+d x+\frac {\pi }{2}\right )^2+B \sin \left (c+d x+\frac {\pi }{2}\right )+C\right )dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {2}{7} \int \frac {1}{2} \cos ^{\frac {3}{2}}(c+d x) (5 A+7 C+7 B \cos (c+d x))dx+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{7} \int \cos ^{\frac {3}{2}}(c+d x) (5 A+7 C+7 B \cos (c+d x))dx+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \int \sin \left (c+d x+\frac {\pi }{2}\right )^{3/2} \left (5 A+7 C+7 B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{7} \left ((5 A+7 C) \int \cos ^{\frac {3}{2}}(c+d x)dx+7 B \int \cos ^{\frac {5}{2}}(c+d x)dx\right )+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left ((5 A+7 C) \int \sin \left (c+d x+\frac {\pi }{2}\right )^{3/2}dx+7 B \int \sin \left (c+d x+\frac {\pi }{2}\right )^{5/2}dx\right )+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{7} \left ((5 A+7 C) \left (\frac {1}{3} \int \frac {1}{\sqrt {\cos (c+d x)}}dx+\frac {2 \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+7 B \left (\frac {3}{5} \int \sqrt {\cos (c+d x)}dx+\frac {2 \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d}\right )\right )+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left ((5 A+7 C) \left (\frac {1}{3} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+7 B \left (\frac {3}{5} \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d}\right )\right )+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {1}{7} \left ((5 A+7 C) \left (\frac {1}{3} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+7 B \left (\frac {6 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d}\right )\right )+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
\(\Big \downarrow \) 3120 |
\(\displaystyle \frac {1}{7} \left ((5 A+7 C) \left (\frac {2 \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {2 \sin (c+d x) \sqrt {\cos (c+d x)}}{3 d}\right )+7 B \left (\frac {6 E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d}+\frac {2 \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{5 d}\right )\right )+\frac {2 A \sin (c+d x) \cos ^{\frac {5}{2}}(c+d x)}{7 d}\) |
(2*A*Cos[c + d*x]^(5/2)*Sin[c + d*x])/(7*d) + ((5*A + 7*C)*((2*EllipticF[( c + d*x)/2, 2])/(3*d) + (2*Sqrt[Cos[c + d*x]]*Sin[c + d*x])/(3*d)) + 7*B*( (6*EllipticE[(c + d*x)/2, 2])/(5*d) + (2*Cos[c + d*x]^(3/2)*Sin[c + d*x])/ (5*d)))/7
3.12.80.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 )*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(m_)*((A_.) + (B_.)*sec[(e_.) + (f_.)*( x_)] + (C_.)*sec[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[b^2 Int[(b*Cos [e + f*x])^(m - 2)*(C + B*Cos[e + f*x] + A*Cos[e + f*x]^2), x], x] /; FreeQ [{b, e, f, A, B, C, m}, x] && !IntegerQ[m]
Leaf count of result is larger than twice the leaf count of optimal. \(341\) vs. \(2(159)=318\).
Time = 12.67 (sec) , antiderivative size = 342, normalized size of antiderivative = 2.78
method | result | size |
default | \(-\frac {2 \sqrt {\left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (240 A \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-360 A -168 B \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (280 A +168 B +140 C \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (-80 A -42 B -70 C \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+25 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-63 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+35 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{105 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, d}\) | \(342\) |
-2/105*((2*cos(1/2*d*x+1/2*c)^2-1)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(240*A*sin( 1/2*d*x+1/2*c)^8*cos(1/2*d*x+1/2*c)+(-360*A-168*B)*sin(1/2*d*x+1/2*c)^6*co s(1/2*d*x+1/2*c)+(280*A+168*B+140*C)*sin(1/2*d*x+1/2*c)^4*cos(1/2*d*x+1/2* c)+(-80*A-42*B-70*C)*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)+25*A*(sin(1/2 *d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d* x+1/2*c),2^(1/2))-63*B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^ 2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))+35*C*(sin(1/2*d*x+1/2*c)^ 2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^( 1/2)))/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x+1/ 2*c)/(2*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.10 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.33 \[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (15 \, A \cos \left (d x + c\right )^{2} + 21 \, B \cos \left (d x + c\right ) + 25 \, A + 35 \, C\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 5 \, \sqrt {2} {\left (5 i \, A + 7 i \, C\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 \, \sqrt {2} {\left (-5 i \, A - 7 i \, C\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 63 i \, \sqrt {2} B {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 63 i \, \sqrt {2} B {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{105 \, d} \]
1/105*(2*(15*A*cos(d*x + c)^2 + 21*B*cos(d*x + c) + 25*A + 35*C)*sqrt(cos( d*x + c))*sin(d*x + c) - 5*sqrt(2)*(5*I*A + 7*I*C)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) - 5*sqrt(2)*(-5*I*A - 7*I*C)*weierstras sPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) + 63*I*sqrt(2)*B*weierstra ssZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - 63*I*sqrt(2)*B*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/d
Timed out. \[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
\[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{\frac {7}{2}} \,d x } \]
\[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{\frac {7}{2}} \,d x } \]
Time = 18.10 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.00 \[ \int \cos ^{\frac {7}{2}}(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {2\,C\,\mathrm {F}\left (\frac {c}{2}+\frac {d\,x}{2}\middle |2\right )}{3\,d}+\frac {2\,C\,\sqrt {\cos \left (c+d\,x\right )}\,\sin \left (c+d\,x\right )}{3\,d}-\frac {2\,A\,{\cos \left (c+d\,x\right )}^{9/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {9}{4};\ \frac {13}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{9\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}}-\frac {2\,B\,{\cos \left (c+d\,x\right )}^{7/2}\,\sin \left (c+d\,x\right )\,{{}}_2{\mathrm {F}}_1\left (\frac {1}{2},\frac {7}{4};\ \frac {11}{4};\ {\cos \left (c+d\,x\right )}^2\right )}{7\,d\,\sqrt {{\sin \left (c+d\,x\right )}^2}} \]
(2*C*ellipticF(c/2 + (d*x)/2, 2))/(3*d) + (2*C*cos(c + d*x)^(1/2)*sin(c + d*x))/(3*d) - (2*A*cos(c + d*x)^(9/2)*sin(c + d*x)*hypergeom([1/2, 9/4], 1 3/4, cos(c + d*x)^2))/(9*d*(sin(c + d*x)^2)^(1/2)) - (2*B*cos(c + d*x)^(7/ 2)*sin(c + d*x)*hypergeom([1/2, 7/4], 11/4, cos(c + d*x)^2))/(7*d*(sin(c + d*x)^2)^(1/2))